function runAsync (x) {
    const p = new Promise(resolve => setTimeout(() => {
        console.log(x)
        return resolve(x)
    }, 1000))
    return p
}

Promise.all([runAsync(1), runAsync(2), runAsync(3)]).then(res => console.log(res))
